package online.hxstart.code.concurrent.chapter06;

/**
 * @author huxing
 * @date 19-5-31 星期五 下午4:30
 * @describe
 */
public class ThreadGroupCreator {

  public static void main(String[] args) {
    ThreadGroup currentGRoup = Thread.currentThread().getThreadGroup();
    ThreadGroup group1 = new ThreadGroup(currentGRoup, "Group1");

    System.out.println(group1.getParent() == currentGRoup);
    ThreadGroup group2 = new ThreadGroup(group1, "Group2");
    System.out.println(group2.getParent() == group1);
  }
}
